Confidential data files are often stored in floppy disks or are delivered via networks that require passwords or that use encryption coding for security. Confidential documents are sent by adding safety seals and impressions during delivery. However, confidential data files and documents are exposed to the danger that the passwords, encryption codes, safety seals and impressions may be broken (deciphered), thereby resulting in unauthorized access to the confidential information.
As flash memory technology becomes more advanced, flash memory is replacing traditional magnetic disks as storage media for mobile systems. Flash memory has significant advantages over floppy disks or magnetic hard disks such as having high-G resistance and low power dissipation. Because of the smaller physical size of flash memory, they are also more conducive to mobile systems. Accordingly, the flash memory trend has been growing because of its compatibility with mobile systems and low-power feature.
However, there are inherent limitations associated with flash memory. First, flash memory cells that have already been programmed must be erased before being reprogrammed. Also, flash memory cells have a limited life span; i.e., they can be erased only a limited number of times before failure. For example, one million is a typical maximum number of erases for a NAND flash memory cell. Accordingly, flash memory access is slow due to the erase-before-write nature, and ongoing erasing will damage the flash memory cells over time.
The memory cell array of a flash memory device is typically organized into basic structures referred to as “sectors” or “pages”, which in turn are grouped into “blocks”. A sector can have 512 bytes (small block format), or 2048 bytes (large block format) as a data field, and 16 bytes or 64 bytes as a spare field. A block is a group (e.g., 16, 32, 64, or more) of sectors, with the number of sectors depending on the specific application. A block is considered “bad” if any of its sectors contains one or more non-functional memory cells (i.e., one or more memory cells that fail to achieve a predetermined minimal operating state during a program or erase operation). A block is considered “good” if all of its memory cells are functional.
A flash memory device may initially have a large number (e.g., 10%) of bad blocks. In addition, a flash memory device may have initially good blocks that later become bad blocks before the end of the manufacturer-specified life span of the flash memory device. These bad blocks manifest during write or erase operations of flash memory device. Unfortunately, increasing occurrences of bad blocks dramatically decreases the performance of the flash memory system.
Most flash memory systems (e.g., electronic data flash cards) utilize more than one flash memory device, and deal with bad blocks by searching the arrays of multiple flash memory devices for available good blocks. Valid data that is stored in a bad block (or data assigned to a bad block) needs to be reassigned and/or relocated to one or more available good blocks. According to conventional methods, this reassignment/relocation process typically involves transferring the data to an external buffer (i.e., located off of the flash memory device) while available good blocks with available good sectors are searched for in any of the flash memory devices of the system. The data is then written to those blocks when a sufficient number of available good sectors are found.
A problem with the above-described conventional reassignment/relocation process is that if one or more flash memory devices are at capacity (i.e., no available good blocks), the flash memory system must continue searching other flash memory devices until a sufficient number of available good blocks with available good sectors are found. This can cause congestion at the external buffer, which adversely affects the overall performance of the flash memory system.
The number of available good blocks in a flash memory device become fewer as flash memory devices fill to capacity and as the number of obsolete (non-valid) blocks increases. An obsolete block is a good block with obsolete sectors, which are sectors that have been programmed with data but the data has been subsequently updated. When the data is updated, the obsolete data remains in the obsolete sector and the updated data is written to new sectors, which become valid sectors having valid data. Valid data can include updated data as well as data that has not been updated. Accordingly, the number of obsolete blocks grows as files are modified or deleted.
Obsolete blocks are recycled in an operation commonly referred to as a “garbage collection” operation. During a garbage collection operation, obsolete blocks are erased so that they are again available for future write operations. An obsolete block can contain both obsolete data and valid data. The valid data needs to be copied to an available good block before the obsolete block can be erased. During a garbage collection operation while a search for available good blocks is being conducted, valid data in an obsolete block is copied to an external buffer while multiple flash memory devices are globally searched to locate available good blocks. Once found, the valid data in the external buffer can be copied to the available good blocks. Similar to the reassignment/relocation process, a problem with this conventional garbage collection operation is that congestion can occur at the external buffer, which adversely affects the performance of the flash memory system.
Another solution for dealing with bad blocks involves replacing blocks in an operation commonly referred to as “wear leveling.” In such an operation, valid data is transferred from one block to another to distribute the data more evenly. However, this operation also involves an external buffer and a search for available good blocks among multiple devices. As stated above, such operations can result in congestion at the external buffer, which adversely affects performance of the flash memory system.
Generally, there is not a good solution to these problems today in that conventional approaches do not address the added processing time required to search multiple flash memory devices for available good blocks. The known solutions also do not address the issue of potential congestion at the external buffer that can occur during such a search. Unfortunately, such limitations adversely affect the management of bad blocks, garbage collection, and wear leveling.
Accordingly, what is needed is an improved system and method for controlling flash memory. The system and method should address the processing time required to search for available good blocks when dealing with bad blocks, garbage collection, and wear leveling. The system and method should also be simple, cost effective and capable of being easily adapted to existing technology. The present invention addresses such a need.